﻿using System;
using System.Collections;
using System.Text;
using System.Configuration;
using System.Xml;

namespace GolfSigma.Inventory.Configuration
{
    public class AuthenticationSection : ConfigurationSection
    {
        [ConfigurationProperty("accessKeyId", IsRequired = true)]
        public string AccessKeyId
        {
            get { return (string)this["accessKeyId"]; }
            set { this["accessKeyId"] = value; }
        }

        [ConfigurationProperty("secretAccessKey", IsRequired = true)]
        public string SecretAccessKey
        {
            get { return (string)this["secretAccessKey"]; }
            set { this["secretAccessKey"] = value; }
        }

        [ConfigurationProperty("serviceUrl", IsRequired = false, DefaultValue = "")]
        public string ServiceURL
        {
            get { return (string)this["serviceUrl"]; }
            set { this["serviceUrl"] = value; }
        }

        [ConfigurationProperty("proxyHost", IsRequired = false, DefaultValue = "")]
        public string ProxyHost
        {
            get { return (string)this["proxyHost"]; }
            set { this["proxyHost"] = value; }
        }

        [ConfigurationProperty("proxyPort", IsRequired = false, DefaultValue = "")]
        public string ProxyPort
        {
            get { return (string)this["proxyPort"]; }
            set { this["proxyPort"] = value; }
        }

        public static AuthenticationSection Load()
        {
            return (AuthenticationSection)ConfigurationManager.GetSection("golfsigma/inventory");
        }
    }
}
